<?php


class EventsAppController extends AppController
{

	function beforeFilter()
	{
		if(!cr("EventConfig.enable_events"))
		{
			$this->errorMsg(__("Invalid URL"));
			if(isset($this->params['admin']) && $this->params['admin'])
			{
				$this->redirect(array("plugin"=>"backend","controller"=>"backend","action"=>"index"));
			} else {
				$this->redirect("/");
			}
		}
		parent::beforeFilter();
	}

}
?>